<?php
namespace Admin\Controller;
use Think\Controller;
use Common\Common\Tree;
class CategoryController extends CommonController {
    public function indexAction(){

    	$sql = "select * from category";

    	$category = M()->query($sql);


		$obj = new Tree();

		$category = $obj->reform($category);

	// echo '<pre>';
	// 	print_r($category);


		$this->assign('category',$category);
       $this->display();
    }

    public function welcomeAction()
    {
    	$this->display();
    }
}


